package com.scs.application.modules.wm.mapper;

import com.scs.application.core.mapper.IBaseMapper;
import com.scs.application.modules.wm.dto.DailyOrderItemDTO;
import com.scs.application.modules.wm.dto.WorkOrderItemDTO;
import com.scs.application.modules.wm.entity.WorkOrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 入库单明细 Mapper 接口
 * </p>
 */
public interface WorkOrderItemMapper extends IBaseMapper<WorkOrderItem> {

    //通过sn去workorder_item找
    List<WorkOrderItemDTO> workOrderItemBySN(@Param("sn") String sn);

    //通过sn去wm_order_barcode找
    List<WorkOrderItemDTO> orderBarcodeBySN(@Param("sn") String sn);

    List<DailyOrderItemDTO> workOrderItemOmoc(List<String> ids);

    List<WorkOrderItemDTO> workOrderItemByMatrId(@Param("matrId") String matrId);

    double getOutspItemSkuQtySum(@Param("stockIds") List<String> stockIds, @Param("flagOmoc") Boolean flagOmoc);

    Double getSumSkuQty(@Param("startDate") String startDate, @Param("endDate") String endDate);

    Double getSumAmount(@Param("startDate") String startDate, @Param("endDate") String endDate);

    List<WorkOrderItem> selectWorkOrderItems(@Param("workOrderId") String workOrderId, @Param("flagStockReagent") Boolean flagStockReagent);

    List<WorkOrderItemDTO> getList(@Param("item") WorkOrderItemDTO item);

}
